<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
  <title>文章管理</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width">        
  <link rel="stylesheet" href="css/templatemo_main.css">
<!-- 
Dashboard Template 
http://www.templatemo.com/preview/templatemo_415_dashboard
-->
</head>
<body>
  <div id="main-wrapper">
    <div class="navbar navbar-inverse" role="navigation">
      <div class="navbar-header">
        <div class="logo"><h1>Dashboard - Admin Template</h1></div>
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button> 
      </div>   
    </div>
    <div class="template-page-wrapper">
      <div class="navbar-collapse collapse templatemo-sidebar">
        <ul class="templatemo-sidebar-menu">
          <li>
            <form class="navbar-form">
              <input type="text" class="form-control" id="templatemo_search_box" placeholder="Search...">
              <span class="btn btn-default">Go</span>
            </form>
          </li>
          <li class="active"><a href="index.html"><i class="fa fa-home"></i>主页</a></li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 用户管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="promoterTables.html">推广员管理</a></li>
              <li><a href="userTables.html">用户管理</a></li>
            </ul>
          </li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 推广管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="picsManage.html">图片管理</a></li>
              <li><a href="atriclesManage.html">文章管理</a></li>
            </ul>
          </li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 广告位管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="advertisingManage.html">广告设置</a></li>
            </ul>
          </li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 咨询管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="counselManage.html">咨询管理</a></li>
            </ul>
          </li> 
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 公告管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="announce.html">发布公告</a></li>
            </ul>
          </li>                    
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 合作方管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="announce.html">发布公告</a></li>
            </ul>
          </li>                    
          <li>
            <a href="partnerManager.html">
              <i class="fa fa-cubes"></i><span class="badge pull-right">9</span>合作方管理
            </a>
          </li>
          <li class="sub">
            <a href="javascript:;">
              <i class="fa fa-database"></i> 佣金管理 <div class="pull-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
            </a>
            <ul class="templatemo-submenu">
              <li><a href="commissionList.html">佣金列表</a></li>
              <li><a href="cashSettlement.html">提现结算</a></li>
            </ul>
          </li>                    
          <li><a href="data-visualization.html"><i class="fa fa-cubes"></i><span class="badge pull-right">9</span>Data Visualization</a></li>
          <li><a href="maps.html"><i class="fa fa-map-marker"></i><span class="badge pull-right">42</span>Maps</a></li>
          <li class="active"><a href="#"><i class="fa fa-users"></i><span class="badge pull-right">NEW</span>Manage Users</a></li>
          <li><a href="preferences.html"><i class="fa fa-cog"></i>Preferences</a></li>
          <li><a href="javascript:;" data-toggle="modal" data-target="#confirmModal"><i class="fa fa-sign-out"></i>Sign Out</a></li>
        </ul>
      </div><!--/.navbar-collapse -->

      <div class="templatemo-content-wrapper">
        <div class="templatemo-content">
          <ol class="breadcrumb">
            <li><a href="index.html">Admin Panel</a></li>
            <li><a href="#">Manage Users</a></li>
            <li class="active">Tables</li>
          </ol>
          <h1>文章管理</h1>
          <p>Here goes tables and users.</p>


<div id="page-wrapper" class="gray-bg dashbard-1">
    <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
          
              <ul class="dropdown-menu">
                <li>
                    <a class="count-info" style="display:block;" href="#" >
                       <i class="fa fa-street-view"></i> <span>&nbsp;&nbsp;账号资料</span>
                   </a>
                </li>
                <li>
                    <a class="count-info" style="display:block;" href="#" >
                       <i class="fa fa-lock"   ></i> <span onclick="updatePwd()">&nbsp;&nbsp;修改密码</span>
                   </a>
                </li>
              </ul>
            </li>
            
        </ul>
    </nav>
   
</div>
 <div id="updateDiv" style="display: none" class="ibox-content"> 
  <div class="form-group">
  </div>
    <form action="" name="updateForm" id="updateForm">
     <input type="hidden" placeholder="原始密码" name="loginName" id="loginName" class="form-control" value="qinhao"  maxlength="10" >
        <div class="form-group">
           <label class="col-sm-4 control-label">原始密码:</label> 
           <div class="col-sm-5">
              <input type="text" placeholder="原始密码" name="oldPwd" id="oldPwd" class="form-control"    maxlength="10" >
           </div>
          
        </div>  
        <br/>
        <div class="form-group"> 
         <label class="col-sm-4 control-label">新密码:</label>
          <div class="col-sm-5">
              <input type="text" placeholder="新密码" name="newPwdOne" id="newPwdOne" class="form-control"    maxlength="10" >
           </div> 
         </div>
         <br/>
         <div class="form-group">
          <label class="col-sm-4 control-label">确认密码:</label>
           <div class="col-sm-5">
              <input type="text" placeholder="再次输入新密码" name="newPwdTwo"  id="newPwdTwo" class="form-control"    maxlength="10" >
           </div> 
        </div>
       
   </form>
    </div>
  <script type="text/javascript">
  var popu = null ;
  function updatePwd(){
     
    popu =   layer.open({
        type: 1,
        shift:-1,
        title: '修改密码',
        skin: 'layui-layer-rim', //加上边框
        area: ['460px','230px'], //宽高
        content: $("#updateDiv").html(),
        btn: ['修改','关闭'],
        yes: function(index,layero){
            //当点击‘确定’按钮的时候，获取弹出层返回的值
            var oldPwd =  $(layero).find("form").find("input[id='oldPwd']").val();
            var newPwdOne =  $(layero).find("form").find("input[id='newPwdOne']").val();
            var newPwdTwo =  $(layero).find("form").find("input[id='newPwdTwo']").val();
            var loginName =  $(layero).find("form").find("input[id='loginName']").val();
            if(oldPwd==""){
           layer.alert('请输入原始密码1', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
           return ;
          }
            if(newPwdOne==""){
           layer.alert('请输入新密码', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
           return ;
          }
            if(newPwdTwo==""){
           layer.alert('请输入确认密码', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
           return ;
          }
            if(newPwdOne!=newPwdTwo){
           layer.alert('两次输入密码不一致', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
             return ;
           }
            $.post(encodeURI("/user/updatePwd"),$(layero).find("form").serialize(), function(data){
                var json = eval("(" + data + ")");
                if ("SUCCESS" == json.errCode) { 
                  layer.close(index);
                   layer.alert('修改成功', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
                   
                } else {
                    layer.alert(json.msg, {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
                }
            });
            //layer.close(index);
        },
        cancel: function(index){
            //右上角关闭回调
           layer.close(index);
        }
      });
   }
 function updatepassWord(){
 
   var oldPwd = $("#oldPwd").val();
   alert(oldPwd);
   var ser = $("#updateForm").serialize(); 
   alert(oldPwd);
   alert(ser);
   if(oldPwd==""){
       layer.alert('请输入原始密码1', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
     return ;
   }
   var newPwdOne = $("#newPwdOne").val();
   if(newPwdOne==""){
       layer.alert('请输入新密码', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
       return ;
   }
   var newPwdTwo = $("#newPwdTwo").val();
   if(newPwdTwo==""){
       layer.alert('请输入确认密码', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
       return ;
   }
   if(newPwdOne!=newPwdTwo){
     layer.alert('两次输入密码不一致', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
       return ;
   }
   $.post(encodeURI("/user/updatePwd"),$("#updateForm").serialize(), function(data){
         var json = eval("(" + data + ")");
         if ("SUCCESS" == json.status) { 
           layer.alert('修改成功', {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
         } else {
             layer.alert(json.message, {shift:-1,skin:'layui-layer-molv',closeBtn: 0});
         }
     });
 }
  
   </script>


  <!-- 新增的右侧内容 -->
        <div class="row">
            <div class="col-sm-12">
            
                <!-- ibox begin -->
                <div class="ibox float-e-margins">
                   <!-- ibox title end -->
                   
                   <!-- ibox content begin -->
                   
                   <div class="ibox-content">
                      <form action="/post/list" method="post" id="partnerForm"> 
                         
                       <div class="row">
                           <div class="col-sm-3 col-md-5">
                                   <input type="text" placeholder="请输入文章标题" name="title" class="form-control" value=""  maxlength="10" >
                           </div>   
                           <div class="col-sm-3 col-md-5">   
                                <select class="form-control m-b" name="status"> 
                                    <option value=""  >--按状态过滤--</option>
                                    <option value="2"   >已发布</option>
                                    <option value="3"  >已下线</option>
                                    <option value="1"  >已创建</option>
                                     
                                </select>
                           </div>
                           <div class="col-sm-1 col-md-2">
                                  <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                  <a href="atriclesManage_add.html" class="btn btn-sm btn-primary" target="_self">新增</a>   
                           </div>
                            
                        </div>
                       </form>
                        <div class="table-responsive">
                            <table class="table table-striped">
                              <thead>
                                  <tr> 
                                      <th >文章编号</th>
                                      <th>文章标题</th>
                                      <th>合作方</th>
                                      <th>文章类型</th> 
                                      <th>文章状态</th> 
                                      <th>阅读次数</th>
                                      <th>分享次数</th>
                                      <th>点赞次数</th> 
                                      <th>创建时间</th>
                                      <th>操作</th> 
                                  </tr>
                              </thead>
                              <tbody>
                                 
                                     <tr>
                                          <td>9220</td>
                                          <td>教你快速拿下农业银行信用卡！一般人我不告诉他！</td>
                                          <td></td> 
                                          <td> 
                                          
                                           
                                           
                                           其它
                                           
                                           </td> 
                                          
                                          <td>
                                              已发布
                                              
                                               
                                          </td>  
                                          <td>53</td>
                                          <td>0</td>
                                          <td>0</td> 
                                          <td>2018-4-17 10:14:42  </td> 
                                          <td> 
                                          
                                           <a href="atriclesManage_check.html" class="btn btn-info btn-xs"  > <i class="fa fa-folder"></i> 查看</a>
                                             <a href="atriclesManage_edit.html" class="btn btn-info btn-xs" > <i class="fa fa-edit"></i> 编辑</a>
                                           
                                            <a href="javascript:pubsh(9220,3)" class="btn btn-info btn-xs" > <i class="fa fa-minus-circle"></i> 下线</a> 
                                           
                                          </td> 
                                      </tr>
                                  

                                 
                              </tbody>
                          </table>
                       </div>
                       <div class="row">
                           <div class="col-sm-12" >
                                <center><nav><ul class="pagination"><li><span>总数：284</span></li><li class="disabled"><a><span aria-hidden="true">&laquo;</span><span class="sr-only">Previous</span></a></li><li class="active" ><a>1</a ></li ><li><a href="/post/list?page=2&title=&status=">2</a></li><li><a href="/post/list?page=3&title=&status=">3</a></li><li><a href="/post/list?page=4&title=&status=">4</a></li><li><a href="/post/list?page=5&title=&status=">5</a></li><li><a href="/post/list?page=6&title=&status=">6</a></li><li><a href="/post/list?page=7&title=&status=">7</a></li><li><a href="/post/list?page=8&title=&status=">8</a></li><li><a href="/post/list?page=9&title=&status=">9</a></li><li><a href="/post/list?page=2&title=&status="><span aria-hidden="true">&raquo;</span><span class="sr-only">Next</span></a></li><li><a href="/post/list?page=29&title=&status=">尾页</a></li></ul></nav></center>
                           </div>
                       </div>
                       
                    </div>
                    <!-- ibox content end -->
               </div>
               <!-- ibox end -->
        </div>
    </div>


  <!-- 新增的右侧内容 -->

        </div>
      </div>

      <!-- Modal -->
      <div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
              <h4 class="modal-title" id="myModalLabel">Are you sure you want to sign out?</h4>
            </div>
            <div class="modal-footer">
              <a href="sign-in.html" class="btn btn-primary">Yes</a>
              <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
            </div>
          </div>
        </div>
      </div>

      <footer class="templatemo-footer">
        <div class="templatemo-copyright">
          <p>Copyright &copy; 2084 Your Company Name <!-- Credit: www.templatemo.com --></p>
        </div>
      </footer>
    </div>
</div>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/templatemo_script.js"></script>
    <script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script
  </body>
</html>